A virtual machine (VM) can be considered an abstract computer that allows for portability of software applications between different underlying computer architectures, including different computer hardware platforms and/or operating systems. The VM provides a uniform layer of abstraction between the hardware platform and any compiled software applications that runs thereon. Virtual machines are considered essential for the portability of certain technologies, such as Java. The Java Virtual Machine (JVM) allows compiled Java programs to be run on the JVM, independently of whatever hardware or operating system may be used underneath. Examples of available JVMs include the Oracle JRockit and Hotspot JVMs.
Recently, there is a desire to deploy virtual machines on high performance computer hardware systems, such as multi-processor rack-based servers, to support highly efficient application server and similar technologies. Examples of application servers which can provide such technologies are the Oracle WebLogic Server. In some instances, a hypervisor acts as an additional layer between the server's hardware and its operating system. This provides an additional abstraction layer that allows each physical server to run one or more virtual servers, and effectively decouples the operating system and its applications from the underlying physical server. This is of particular use in a cloud-based environment.
Unfortunately there often arises a conflict between the hypervisor memory sharing, and that of the Java Virtual Machine. For example, in those environments in which a virtual machine image is used to boot virtual servers, initially a lot of memory can be shared between the different virtual servers, before the application server has loaded. Then, as soon as the application server starts executing with a real load, the JVM will compile new code, and potentially re-optimize old code. This changing, and forced un-sharing is significantly worse when the JVM tries to use large-pages to optimize performance. These are the general areas that embodiments of the present invention are intended to address.